quasqui
Version:
The meta-framework suite designed from scratch for frontend-focused modern web development.
24 lines (21 loc) • 399 B
text/typescript
import { String, match } from '@modern-js/bff-runtime';
export const get = match(
{
request: { params: { id: String } },
response: { id: String },
},
({ params: { id } }) => ({ id }),
);
export const post = match(
{
request: {
params: { id: String },
data: {},
},
response: { id: String },
},
({ params: { id }, data }) => ({
id,
data,
}),
);